/**
 * 
 */
package liwei;

import java.awt.Dimension;
import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

import javax.swing.undo.UndoManager;

import zhangzhifan.FontChooseDlg;

import chrriis.common.UIUtils;
import chrriis.dj.nativeswing.swtimpl.NativeInterface; 
import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;

/**
 * @author LiWei
 * this class contains some frames that needed to construct when starting the program,
 * and this class also contains some global elements
 */
public class Main
{

	/**
	 * @param args
	 */
	public static void main(String[] args)
	{
		// TODO 自动生成的方法存根
		MyFrame aFrame = new MyFrame();
		aFrame.setVisible(true);
		//the frame of setting font
		fontChooseDlg = new FontChooseDlg(aFrame.getMyPanel().getMainTextArea());
		fontChooseDlg.setVisible(false);
		//the logger we used here
		logger = Logger.getLogger("DefaultLog.log");
		try{
			FileHandler handler = new FileHandler("TextEditor.log");//¿ÉÒÔÓÃ %h/xxxx.log±íÊ¾ÔÚÓÃ»§Ö÷Ä¿Â¼ÏÂ
			handler.setFormatter( new SimpleFormatter());
			logger.addHandler(handler);
		}catch(IOException ex){}
	}
	static public String fileName;
	static public UndoManager undoManager;
	public static Dimension screenSize;
	public static Logger logger;
	public static FontChooseDlg fontChooseDlg;
}
